﻿using UnityEngine;

namespace AutoRoot
{
   public class ButtonState
   {
      public ButtonState nextState;

      public Sprite originImage;
      public Sprite touchDownImage;

      public ButtonStateHandler handler;

      public ButtonState(Sprite orgImg, Sprite tdImg, ButtonStateHandler hdl)
      {
         originImage = orgImg;
         touchDownImage = tdImg;
         handler = hdl;
      }

      public ButtonState NextState()
      {
         if (handler != null)
         {
            handler.Execute();
         }
         return nextState;
      }
   }
}
